public class PlayerDashState : PlayerState
{
    public PlayerDashState(Player player, string animBoolName) : base(player, animBoolName) { }

    public override void Enter()
    {
        base.Enter();
        skillManager.Dash.CloneOnDash();
        stateTimer = player.dashDuration;
        player.Stats.MakeInvincible(true);
    }

    public override void Exit()
    {
        base.Exit();
        skillManager.Dash.CloneOnArrival();
        player.SetVelocity(0, rb.velocity.y);
        player.Stats.MakeInvincible(false);
    }

    public override void Update()
    {
        base.Update();
        if (!player.IsGroundDetected() && player.IsWallDetected())
        {
            StateMachine.ChangeState(player.WallslideState);
            return;
        }
        if (stateTimer <= 0 && player.IsGroundDetected())
        {
            StateMachine.ChangeState(player.IdleState);
            return;
        }
        if (stateTimer <= 0 && !player.IsGroundDetected())
        {
            StateMachine.ChangeState(player.AirState);
            return;
        }
        player.SetVelocity(player.dashSpeed * player.DashDir, 0);
        player.Fx.CreateAfterImage();
    }
}